package com.hystericalporpoises.thingamajava.db;

import static org.junit.Assert.*;

import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.junit.Test;


public class DatabaseTestCase {

  @Test
  public void fireUp() throws Exception {
    Session session = TestDatabase.getSession();
    SQLQuery query = session.createSQLQuery("select 1 as x from information_schema.tables");
    query.setFirstResult(1);
    query.setMaxResults(1);
    Object uniqueResult = query.uniqueResult();
    assertEquals("1", uniqueResult.toString());
  }
}
